﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Edition membre
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <% var m = Model.memberData[0]; %>
    <% Html.RenderPartial("../Layout/admin_menu"); %>
    <ul class="breadcrumb">
        <li><a href="/Admin/Members">Tous les membres</a> <span class="divider">&raquo;</span></li>
        <li class="active"><a href="/Admin/Members/Edit/<%= m.id %>">Edtion</a> <span class="divider">&raquo;</span></li>
    </ul>
    <h2>Edition</h2>
    <div class="container">
        <div class="row well">
            <h4>Informations générales</h4>
            <form class="form-horizontal" action="/Admin/Members/Edit/<%= m.id %>" method="post">
                <div class="control-group">
                    <label class="control-label">Login</label>
                    <div class="controls">
                        <input type="text" name="username" value="<%= m.username  %>" />
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label">Email</label>
                    <div class="controls">
                        <input type="text" name="email" value="<%= m.email %>" />
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label">Role</label>
                    <div class="controls">
                        <select name="role">
                        <% foreach (var role in Model.getRoles()) { %>
                            <option <% if (m.role_id == role.id) {Response.Write("selected=\"selected\"");} %> value="<%= role.id %>"><%= role.label %></option>
                        <% } %>
                        </select>
                    </div>
                </div>
                <div class="control-group">
                    <div class="controls">
                        <button class="btn btn-info" type="submit"><i class="icon-refresh icon-white"></i> Mettre a jour</button>
                    </div>
                </div>
            </form>
        </div>
    </div>

</asp:Content>

